package gbench.appdemo.mall.erp.components;

import java.util.List;
import java.util.function.Function;

import gbench.appdemo.mall.erp.MyERPApp.Order;
import gbench.common.matlib.MatlibCanvas.XVec;
import gbench.common.matlib.rdd.BasePair;

public interface IStoreBill<S> {

    /**
     * 仓储单
     * 
     * @param ratios 发货/收货比率
     * @return 仓储单
     */
    public <T, U> U map(final Function<IStoreBill<T>, U> mapper, final Double... ratios);

    /**
     * 
     * @param base
     * @return
     */
    public <T> XVec<BasePair<ILineItem, ILineItem>> baseline(final Order<T> base);

    /**
     * 
     * @param base
     * @return
     */
    public XVec<BasePair<ILineItem, ILineItem>> baseline();

    /**
     * 
     * @return
     */
    public List<ILineItem> getLineItems();

    /**
     * 返回订单对象
     * 
     * @return
     */
    public IOrder<Object> getOrder();

    /**
     * 
     * @param owner
     * @return
     */
    public S setOwner(final IEnterprise owner);

    /**
     * 
     * @return
     */
    public IEnterprise getOwner();
}
